import functionnodes.FunctionNode;
import data.Value;

/**
 * @author loaner
 */
class functionnodes.FunctionNodeLt extends FunctionNode {
	
	function FunctionNodeLt() {
		super();
		funcname = "lt";
	}
	
	public function reduceValues( scope:Object, args:Array):Value
	{
		var returnvalue:Value;
		if( args[0].raw() < args[1].raw() )
		{
			var tempXML:XML = new XML( "<symbol>t</symbol>" );
			returnvalue = new Value( Value.BOOLEAN, true,  XMLNode( tempXML.firstChild ));
		}
		else
		{
			var tempXML:XML = new XML( "<symbol>nil</symbol>" );
			returnvalue = new Value( Value.BOOLEAN, false, XMLNode( tempXML.firstChild ));
		}
		trace("returning " + returnvalue );
		return returnvalue;
	}

}